class authMiddleware {
  /** 需要用户登录*/
  loginRequired(req, res, next) {
    if (!req.session.adminInfo) {
      res.redirect('/admin/login');
    } else {
      next();
    }
  }
}

module.exports = new authMiddleware();